<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="javax.naming.InitialContext"%>
<%@page import="javax.sql.DataSource"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.Statement"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
test
<%
	InitialContext cxt = new InitialContext();
	if ( cxt == null ) {
	   throw new Exception("Uh oh -- no context!");
	}
	
	DataSource ds = (DataSource) cxt.lookup( "java:/comp/env/jdbc/droiding" );
	
	
	
	if ( ds == null ) {
	   throw new Exception("Data source not found!");
	}
	
	Connection conn = ds.getConnection();
	Statement stm = conn.createStatement();
	stm.execute("select * from tbl_test");
	conn.close();


%>
test
</body>
</html>